package com.atguigu.schedule.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.io.Serializable;

/**
 * 人脸检测结果
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FaceDetectionResult implements Serializable {
    
    /**
     * 人脸位置 - X坐标
     */
    private int x;
    
    /**
     * 人脸位置 - Y坐标
     */
    private int y;
    
    /**
     * 人脸宽度
     */
    private int width;
    
    /**
     * 人脸高度
     */
    private int height;
    
    /**
     * 识别出的人员姓名（如果识别成功）
     */
    private String recognizedName;
    
    /**
     * 识别置信度（0-100）
     */
    private double confidence;
    
    /**
     * 是否识别成功
     */
    private boolean recognized;
    
    /**
     * 检测时间戳
     */
    private long timestamp;
    
    public FaceDetectionResult(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.height = height;
        this.recognizedName = "Unknown";
        this.confidence = 0.0;
        this.recognized = false;
        this.timestamp = System.currentTimeMillis();
    }
}
